<template>
  <div class="commBox">
    <!-- 我的评论页面 -->
    <div class="commTitle">我的评论</div>
    <ul>
      <li class="commLi" v-for="(item,index) in mycommList" :key="index">
          <span>{{item.topic}}</span>
          <span>{{ item.title }}</span>
          <span>{{ item.date }}</span>
          <p>{{ item.text }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
import api from '../../api'
export default {
    data(){
        return {
            mycommList:[]
        }
    },
    mounted(){
        api.getMycomment().then(res => {
            this.mycommList = res.data.list
        })
    }
};
</script>

<style>
.commBox {
  width: 900px;
  height: 780px;
  background: #fff;
}
.commTitle {
  padding-left: 50px;
  width: 850px;
  height: 50px;
  text-align: left;
  border-bottom: 1px solid #ccc;
  line-height: 50px;
  color: #999;
}
.commLi {
  padding: 15px;
  height: 50px;
  line-height: 30px;
  text-align: left;
  margin: 0 15px;
  width: 840px;
  border-bottom: 1px solid #ccc;
}
.commLi > span{
    color: #09ade2;
}
.commLi > span:first-of-type {
  display: inline-block;
  width: 50px;
  height: 20px;
  text-align: left;
  border-right: 2px solid #000;
  line-height: 20px;
  margin-right: 10px;
  font-weight: 700;
}
.commLi > span:nth-of-type(2) {
  display: inline-block;
  width: 250px;
}
.commLi > span:nth-of-type(3) {
  display: inline-block;
  float: right;
  color: #999;
}
</style>